

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0"> 
	<title>后台登录 - 快方管理后台</title>
    <link href="/public/plugins/new_login/css/default.css" rel="stylesheet" type="text/css" />
	<!--必要样式-->
    <link href="/public/plugins/new_login/css/styles.css" rel="stylesheet" type="text/css" />
    <link href="/public/plugins/new_login/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="/public/plugins/new_login/css/loaders.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    	
		.hidden{
			display: none;
		}
		#verify-code{
			font-size: 14px;
			text-align: right;
			padding-right: 20px;
			color: #D3D7F7;
		}
		.layui-layer-content{
			color: #333;
		}
    </style>
</head>
<body>
	<div class='login'>
	  <div class='login_title'>
	    <span>管理员登录</span>
	  </div>
	  <div class='login_fields'>
	    <div class='login_fields__user'>
	      <div class='icon'>
	        <img alt="" src='/public/plugins/new_login/img/user_icon_copy.png'>
	      </div>
	      <input placeholder='用户名' maxlength="16" type='text' autocomplete="new-password"  value=""/>
	        <div class='validation'>
	          <img alt="" src='/public/plugins/new_login/img/tick.png'>
	        </div>
	    </div>
	    <div class='login_fields__password'>
	      <div class='icon'>
	        <img alt="" src='/public/plugins/new_login/img/lock_icon_copy.png'>
	      </div>
	      <input placeholder='密码' maxlength="16" type='password' autocomplete="new-password">
	      <div class='validation'>
	        <img alt="" src='/public/plugins/new_login/img/tick.png'>
	      </div>
	    </div>
	    <div class='login_fields__password' id="verify-code">
	        <span class="input-text size-L get">点击获取验证码</span>
	        <div style="position: absolute; bottom: 33px; left: 15px; z-index: 9999">
	            <img class="hidden img">
	        </div>
	        <a class="refresh" id="kanbuq" href="javascript:;">点击换一个</a>
	        <input id="code" name="code" type="hidden">
	        <span class="msg-box" for="code" style="margin-top:4px;top:0"></span>
	    </div>
	    <div class='login_fields__submit'>
	      <input type='button' value='登录'>
	    </div>
	  </div>
	  <div class='success'>
	  </div>
	  <div class='disclaimer'>
	    <p>欢迎登陆第三方配送系统</p>
	  </div>
	</div>
	<div class="OverWindows"></div>
	<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>

	<script type="text/javascript" src="/public/plugins/new_login/js/jquery-ui.min.js"></script>
	<script type="text/javascript" src='/public/plugins/new_login/js/stopExecutionOnTimeout.js?t=1'></script>
    <script src="/public/plugins/new_login/layui/layui.js" type="text/javascript"></script>
    <script src="/public/plugins/new_login/js/Particleground.js" type="text/javascript"></script>
    <script src="/public/plugins/new_login/Js/Treatment.js" type="text/javascript"></script>
    <script src="/public/plugins/new_login/js/jquery.mockjax.js" type="text/javascript"></script>

    <script type="text/javascript" src="/public/plugins/h-ui/js/H-ui.min.js"></script>
	<script type="text/javascript" src="/public/plugins/h-ui.admin/js/H-ui.admin.js"></script>
	<script type="text/javascript" src="/public/plugins/layer/layer.js?v=2.4"></script>
	<script type="text/javascript" src="/public/plugins/validator/jquery.validator.js"></script>
    <script type="text/javascript">
    	var chars = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];

		function generateMixed(n) {
		     var res = "";
		     for(var i = 0; i < n ; i ++) {
		         var id = Math.ceil(Math.random()*35);
		         res += chars[id];
		     }
		     return res;
		}
    </script>
	<script type="text/javascript">
		
		$('#verify-code').verifyCode({
	        success: function () { $('#code').val('1'); },
	        error: function () { }
	    });

		var canGetCookie = 0;//是否支持存储Cookie 0 不支持 1 支持
		var ajaxmockjax = 1;//是否启用虚拟Ajax的请求响 0 不启用  1 启用
		
		var historyUn = window.localStorage.getItem("username");

		$("input[type='text']:eq(0)").val(historyUn);

		/*$("input[type='text']:eq(0)").attr("name", un_input_name);
		$("input[type='text']:eq(1)").attr("name", pw_input_name);*/
		

	    
	    $(document).keypress(function (e) {
	        // 回车键事件  
	        if (e.which == 13) {
	            $('input[type="button"]').click();
	        }
	    });
	    //粒子背景特效
	    $('body').particleground({
	        dotColor: '#4FA1D9',
	        lineColor: '#133b88'
	    });
	    $('input[name="pwd"]').focus(function () {
	        $(this).attr('type', 'password');
	    });
	    $('input[type="text"]').focus(function () {
	        $(this).prev().animate({ 'opacity': '1' }, 200);
	    });
	    $('input[type="text"],input[type="password"]').blur(function () {
	        $(this).prev().animate({ 'opacity': '.5' }, 200);
	    });
	    $('input[name="login"],input[name="pwd"]').keyup(function () {
	        var Len = $(this).val().length;
	        if (!$(this).val() == '' && Len >= 5) {
	            $(this).next().animate({
	                'opacity': '1',
	                'right': '30'
	            }, 200);
	        } else {
	            $(this).next().animate({
	                'opacity': '0',
	                'right': '20'
	            }, 200);
	        }
	    });
	    var open = 0;
	    layui.use('layer', function () {
	        //非空验证
	        $('input[type="button"]').click(function () {
	            var login = $("input[type='text']:eq(0)").val();
	            var pwd = $("input[type='password']:eq(0)").val();
	            var code = $('input[name="code"]').val();

	            if(code.length < 1){
	            	layer.msg('验证码不能为空', {icon: 5});
	            	return true;
	            }
	            $.ajax({
	            	url: window.location.href,
	            	type: "POST",
	            	dataType: "json",
	            	data:{"mno": login, "pwd": pwd, "code" : code},
	            	success:function(data){
	            		if (data.status) window.location.href = data.url;
            			else layer.msg(data.info || '登录失败，请重试', {icon: 5});
	            	}
	            })

	            window.localStorage.setItem("username", login);
	        })
	    })
	    var fullscreen = function () {
	        elem = document.body;
	        if (elem.webkitRequestFullScreen) {
	            elem.webkitRequestFullScreen();
	        } else if (elem.mozRequestFullScreen) {
	            elem.mozRequestFullScreen();
	        } else if (elem.requestFullScreen) {
	            elem.requestFullscreen();
	        } else {
	            //浏览器不支持全屏API或已被禁用  
	        }
	    }  

	     window.onload = function() {
            if (!window.applicationCache) {
            	window.location.href="/login?old=1"
            }
        }

    </script>
</body>
</html>
